package com.study.quiz.service;

import com.study.quiz.dto.PageDTO;
import com.study.quiz.dto.QuestionDTO;
import com.study.quiz.pojo.Question;

import java.util.List;

/**
 * @author CJunGod
 * @create 2020-03-05 17:46
 **/
public interface QuestionService {

    PageDTO findList(String search, Integer page, Integer size);

    PageDTO findByUserId(Integer userId, Integer page, Integer size);

    QuestionDTO findById(Integer questionId);

    Integer insert(Question question);

    Question findByQuestionId(Integer questionId);

    Integer updateById(Question question);

    Integer updateView(Integer questionId, Long gmtModified);

    Integer updateComment(Integer questionId, Long gmtModified);

    List<QuestionDTO> selectRelated(QuestionDTO questionDTO);
}
